<!-- HTML header for doxygen 1.8.6-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/xhtml;charset=utf-8" http-equiv="Content-Type"/>
<meta content="IE=9" http-equiv="X-UA-Compatible"/>
<meta content="Doxygen 1.8.13" name="generator"/>
<title>OpenCV: Autocalibration</title>
<link href="../../opencv.ico" rel="shortcut icon" type="image/x-icon"/>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script src="../../jquery.js" type="text/javascript"></script>
<script src="../../dynsections.js" type="text/javascript"></script>
<script src="../../tutorial-utils.js" type="text/javascript"></script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script src="../../search/searchdata.js" type="text/javascript"></script>
<script src="../../search/search.js" type="text/javascript"></script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
//<![CDATA[
MathJax.Hub.Config(
{
  TeX: {
      Macros: {
          matTT: [ "\\[ \\left|\\begin{array}{ccc} #1 & #2 & #3\\\\ #4 & #5 & #6\\\\ #7 & #8 & #9 \\end{array}\\right| \\]", 9],
          fork: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ \\end{array} \\right.", 4],
          forkthree: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ #5 & \\mbox{#6}\\\\ \\end{array} \\right.", 6],
          forkfour: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ #5 & \\mbox{#6}\\\\ #7 & \\mbox{#8}\\\\ \\end{array} \\right.", 8],
          vecthree: ["\\begin{bmatrix} #1\\\\ #2\\\\ #3 \\end{bmatrix}", 3],
          vecthreethree: ["\\begin{bmatrix} #1 & #2 & #3\\\\ #4 & #5 & #6\\\\ #7 & #8 & #9 \\end{bmatrix}", 9],
          cameramatrix: ["#1 = \\begin{bmatrix} f_x & 0 & c_x\\\\ 0 & f_y & c_y\\\\ 0 & 0 & 1 \\end{bmatrix}", 1],
          distcoeffs: ["(k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6 [, s_1, s_2, s_3, s_4[, \\tau_x, \\tau_y]]]]) \\text{ of 4, 5, 8, 12 or 14 elements}"],
          distcoeffsfisheye: ["(k_1, k_2, k_3, k_4)"],
          hdotsfor: ["\\dots", 1],
          mathbbm: ["\\mathbb{#1}", 1],
          bordermatrix: ["\\matrix{#1}", 1]
      }
  }
}
);
//]]>
</script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js" type="text/javascript"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css"/>
<link href="../../stylesheet.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<!--#include virtual="/google-search.html"-->
<table cellpadding="0" cellspacing="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="../../opencv-logo-small.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">OpenCV
    <span id="projectnumber">4.5.2</span>
   </div>
   <div id="projectbrief">Open Source Computer Vision</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
<script src="../../menudata.js" type="text/javascript"></script>
<script src="../../menu.js" type="text/javascript"></script>
<script type="text/javascript">
$(function() {
  initMenu('../../',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow" onkeydown="return searchBox.OnSearchSelectKey(event)" onmouseout="return searchBox.OnSearchSelectHide()" onmouseover="return searchBox.OnSearchSelectShow()">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe frameborder="0" id="MSearchResults" name="MSearchResults" src="javascript:void(0)">
</iframe>
</div>
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Autocalibration<div class="ingroups"><a class="el" href="../../d1/d46/group__stitching.html">Images stitching</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga76195b136d2d9cdbee5db812defa1428"><td align="right" class="memItemLeft" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/dbc/group__stitching__autocalib.html#ga76195b136d2d9cdbee5db812defa1428">cv::detail::calibrateRotatingCamera</a> (const std::vector&lt; <a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &gt; &amp;Hs, <a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &amp;K)</td></tr>
<tr class="separator:ga76195b136d2d9cdbee5db812defa1428"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga7de597a5c64fc2b9e64e7889936fd370"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/dbc/group__stitching__autocalib.html#ga7de597a5c64fc2b9e64e7889936fd370">cv::detail::estimateFocal</a> (const std::vector&lt; <a class="el" href="../../d4/db5/structcv_1_1detail_1_1ImageFeatures.html">ImageFeatures</a> &gt; &amp;features, const std::vector&lt; <a class="el" href="../../d2/d9a/structcv_1_1detail_1_1MatchesInfo.html">MatchesInfo</a> &gt; &amp;pairwise_matches, std::vector&lt; double &gt; &amp;focals)</td></tr>
<tr class="memdesc:ga7de597a5c64fc2b9e64e7889936fd370"><td class="mdescLeft"> </td><td class="mdescRight">Estimates focal lengths for each given camera.  <a href="../../d4/dbc/group__stitching__autocalib.html#ga7de597a5c64fc2b9e64e7889936fd370">More...</a><br/></td></tr>
<tr class="separator:ga7de597a5c64fc2b9e64e7889936fd370"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga0d78f56152790435703b556e0f5840f1"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/dbc/group__stitching__autocalib.html#ga0d78f56152790435703b556e0f5840f1">cv::detail::focalsFromHomography</a> (const <a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &amp;H, double &amp;f0, double &amp;f1, bool &amp;f0_ok, bool &amp;f1_ok)</td></tr>
<tr class="memdesc:ga0d78f56152790435703b556e0f5840f1"><td class="mdescLeft"> </td><td class="mdescRight">Tries to estimate focal lengths from the given homography under the assumption that the camera undergoes rotations around its centre only.  <a href="../../d4/dbc/group__stitching__autocalib.html#ga0d78f56152790435703b556e0f5840f1">More...</a><br/></td></tr>
<tr class="separator:ga0d78f56152790435703b556e0f5840f1"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a id="details" name="details"></a><h2 class="groupheader">Detailed Description</h2>
<h2 class="groupheader">Function Documentation</h2>
<a id="ga76195b136d2d9cdbee5db812defa1428"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga76195b136d2d9cdbee5db812defa1428">◆ </a></span>calibrateRotatingCamera()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool cv::detail::calibrateRotatingCamera </td>
          <td>(</td>
          <td class="paramtype">const std::vector&lt; <a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &gt; &amp; </td>
          <td class="paramname"><em>Hs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &amp; </td>
          <td class="paramname"><em>K</em> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval, K</td><td>=</td><td>cv.detail.calibrateRotatingCamera(</td><td class="paramname">Hs[, K]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d3/d45/autocalib_8hpp.html">opencv2/stitching/detail/autocalib.hpp</a>&gt;</code></p>
</div>
</div>
<a id="ga7de597a5c64fc2b9e64e7889936fd370"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga7de597a5c64fc2b9e64e7889936fd370">◆ </a></span>estimateFocal()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::detail::estimateFocal </td>
          <td>(</td>
          <td class="paramtype">const std::vector&lt; <a class="el" href="../../d4/db5/structcv_1_1detail_1_1ImageFeatures.html">ImageFeatures</a> &gt; &amp; </td>
          <td class="paramname"><em>features</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::vector&lt; <a class="el" href="../../d2/d9a/structcv_1_1detail_1_1MatchesInfo.html">MatchesInfo</a> &gt; &amp; </td>
          <td class="paramname"><em>pairwise_matches</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::vector&lt; double &gt; &amp; </td>
          <td class="paramname"><em>focals</em> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d3/d45/autocalib_8hpp.html">opencv2/stitching/detail/autocalib.hpp</a>&gt;</code></p>
<p>Estimates focal lengths for each given camera. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">features</td><td>Features of images. </td></tr>
    <tr><td class="paramname">pairwise_matches</td><td>Matches between all image pairs. </td></tr>
    <tr><td class="paramname">focals</td><td>Estimated focal lengths for each camera. </td></tr>
  </table>
  </dd>
</dl>
</div>
</div>
<a id="ga0d78f56152790435703b556e0f5840f1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga0d78f56152790435703b556e0f5840f1">◆ </a></span>focalsFromHomography()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::detail::focalsFromHomography </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &amp; </td>
          <td class="paramname"><em>H</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double &amp; </td>
          <td class="paramname"><em>f0</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double &amp; </td>
          <td class="paramname"><em>f1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool &amp; </td>
          <td class="paramname"><em>f0_ok</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool &amp; </td>
          <td class="paramname"><em>f1_ok</em> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>None</td><td>=</td><td>cv.detail.focalsFromHomography(</td><td class="paramname">H, f0, f1, f0_ok, f1_ok</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d3/d45/autocalib_8hpp.html">opencv2/stitching/detail/autocalib.hpp</a>&gt;</code></p>
<p>Tries to estimate focal lengths from the given homography under the assumption that the camera undergoes rotations around its centre only. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">H</td><td>Homography. </td></tr>
    <tr><td class="paramname">f0</td><td>Estimated focal length along X axis. </td></tr>
    <tr><td class="paramname">f1</td><td>Estimated focal length along Y axis. </td></tr>
    <tr><td class="paramname">f0_ok</td><td>True, if f0 was estimated successfully, false otherwise. </td></tr>
    <tr><td class="paramname">f1_ok</td><td>True, if f1 was estimated successfully, false otherwise.</td></tr>
  </table>
  </dd>
</dl>
<p>See "Construction of Panoramic Image Mosaics with Global and Local Alignment" by Heung-Yeung Shum and Richard Szeliski. </p>
</div>
</div>
</div><!-- contents -->
<!-- HTML footer for doxygen 1.8.6-->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Fri Apr 2 2021 11:36:41 for OpenCV by  <a href="http://www.doxygen.org/index.html">
<img alt="doxygen" class="footer" src="../../doxygen.png"/>
</a> 1.8.13
</small></address>
<script type="text/javascript">
//<![CDATA[
addTutorialsButtons();
//]]>
</script>
</body>
</html>
